<%@ page contentType="text/html; charset=utf-8" language="java"
	import="java.sql.*"%>
<%@ page import="mybean.message"%>
<html lang="en">
	<head>

		<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>留言</title>
		<style>
.navbar {
	background-color: rgb(34, 92, 168); wdith：100px;
	padding: 10px;
	height: 80px;
	font-size: 40px;
	color: white;
	wdith:1000px;
}

.navbar p {
	font-family: 微软雅黑;
	text-align: center;
	background-color: 
}
</style>
	</head>
	<jsp:useBean id="message" scope="page" class="mybean.message" />
	<body>
		<%
			String userid = "", name = "", address = "", phone = "", dep = "", bookname = "", press = "", number = "", day = "";
		%>

		<div class="container">

            <div class="navbar">
       
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-menu">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <p>所有留言</p>
                   
                </div>
            </div>

			<div class="container">
				<div>
					<table class="table  table-hover"  border="0"
						align="center" cellpadding="1" cellspacing="0">
						<tr>
							<td>
								<div >
									<span class="STYLE3">用户号</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">姓名</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">地址</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">电话</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">所在系</span>
								</div>
							</td>
							<td>
								<div>
									<span class="STYLE3">书名</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">出版社</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">数量</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">日期</span>
								</div>
							</td>
							<td>
								<div >
									<span class="STYLE3">操作</span>
								</div>
							</td>
						</tr>
						<%
							ResultSet rs = message.getMessage();

							while (rs.next())

							{

								userid = rs.getString("userid");

								name = rs.getString("name");

								address = rs.getString("address");

								phone = rs.getString("phone");

								dep = rs.getString("dep");

								bookname = rs.getString("bookname");

								press = rs.getString("press");

								number = rs.getString("number");
								day = rs.getString("day");
						%>
						<tr>

							<td><%=userid%></td>

							<td><%=name%></td>

							<td><%=address%></td>

							<td><%=phone%></td>

							<td><%=dep%></td>

							<td><%=bookname%></td>

							<td><%=press%></td>

							<td><%=number%></td>

							<td><%=day%></td>

							<td>
								<a href="LeaveMessageServlet?action=delete&userid=<%=userid%>">删除</a>
							</td>

						</tr>
						<%
							}
						%>

					</table>
				</div>
			</div>
			<div>
			</div>
		
		<script src="lib/jquery-3.2.1.min.js"></script>
		<script src="lib/bootstrap/js/bootstrap.js"></script>
		<p align="center">
			&nbsp;
			<a href="manager/manager.jsp">&lt;&lt;Back </a>
		</p>
	</body>

</html>